package com.swgk.core.customview;

import android.content.Context;
import androidx.appcompat.widget.AppCompatEditText;
import android.util.AttributeSet;

/**
 * @author zkw
 * @describe
 * @date 2019/1/7
 */
public class CommonEditText extends AppCompatEditText {
    public CommonEditText(Context context) {
        this(context, null);
    }

    public CommonEditText(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public CommonEditText(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        String content = getText().toString();
        if (content != null) {
            setSelection(content.length());
        }
        setFocusable(true);
        setFocusableInTouchMode(true);
        setEnabled(false);
    }
}
